﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using WpfSnqkGasAnalysis.Model;
using WpfSnqkGasAnalysis.IBusiness_impl;

namespace WpfSnqkGasAnalysis
{
    /// <summary>
    /// 查看气数据操作日志
    /// </summary>
    /// 创建时间：2022-12-12 13:55:37。作者：王浩力
    public partial class WindowGasStepLog : Window
    {
        public WindowGasStepLog()
        {
            InitializeComponent();
        }

        /// <summary>
        /// 点击的数据主键
        /// </summary>
        internal long gasKey;

       public ObservableCollection<Gas_check_history> HistoryList { get; set; }

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            HistoryList=new ObservableCollection<Gas_check_history>();
            Gas_analysisBusiness buss = new Gas_analysisBusiness();
            var list = buss.GetStepLog(gasKey);
            list.ForEach(item =>
            {
                HistoryList.Add(item);
            });
            listView.ItemsSource = HistoryList;
        }
    }
}
